<?php /* Smarty version Smarty-3.1.18, created on 2017-05-17 08:15:35
         compiled from "/data/www/mystery/protected/modules/webadmin/views/user/list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:81725246054c4c4861efda0-76990698%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5e6c0b9dd71da4d318463b3b1c4a97e74f235fdd' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/user/list.tpl',
      1 => 1494904927,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '81725246054c4c4861efda0-76990698',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54c4c4862584b3_96213676',
  'variables' => 
  array (
    'allgroup' => 0,
    'key' => 0,
    'group_id' => 0,
    'val' => 0,
    'nickname' => 0,
    'list' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54c4c4862584b3_96213676')) {function content_54c4c4862584b3_96213676($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<table width="100%" border="0" cellspacing="0">
 <tr>
    <td width="13%" valign="top">
            <?php echo $_smarty_tpl->getSubTemplate ("../common/left.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

    </td>
    <td width="87%" valign="top">
        <table width="100%" border="0" cellspacing="0">
            <tr>
                <td>
                    <div class="subnav">
                        <form name="form" method="get" action="">
                        <div class="content-menu ib-a blue line-x">
                         <a class="on" href="javascript:;"><em>管理员列表</em></a><span>|</span><a href="/webadmin/user/add"><em>添加管理员</em></a> 
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <select name="group_id">
                             <option value="0">所有分组</option>
                             <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['allgroup']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                             <option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['key']->value==$_smarty_tpl->tpl_vars['group_id']->value) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
</option>
                             <?php } ?>
                         </select>
                         用户名：<input type="text" name="nickname" class="input-text" value="<?php echo $_smarty_tpl->tpl_vars['nickname']->value;?>
"><input type="submit" name="dosubmit" class="button" value="搜索">
                         </div>
                        <div class="clearbox"></div>
                    </div>
                    </form>
                    <div class="pad_10">
                        <div class="table-list">
                                <table width="100%" cellspacing="0">
                                      <thead>
                                        <tr>
                                              <th width="10%" align="left">登录名</th>
                                              <th width="10%" align="left">真实姓名</th>
                                              <th widht="10%" align="left">联系方式</th>
                                              <th width="10%" align="left">用户组</th>
                                              <th width="17%" align="left">所属项目</th>
                                              <th width="10%" align="left">最后登录IP</th>
                                              <th width="12%" align="left">最后登录时间</th>
                                              <th width="10%">管理操作</th>
                                        </tr>
                                      </thead>
                                      <tbody>
                                       <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                                        <tr onMouseOver="this.className='tr2'" onMouseOut="this.className='tr1'" class="tr1" id="user_<?php echo $_smarty_tpl->tpl_vars['val']->value['user_id'];?>
">
                                              <td width="10%" valign="middle"><?php echo $_smarty_tpl->tpl_vars['val']->value['username'];?>
</td>
                                              <td width="10%" valign="middle"><?php echo $_smarty_tpl->tpl_vars['val']->value['truename'];?>
</td>
                                              <td width="10%" valign="middle"><?php echo $_smarty_tpl->tpl_vars['val']->value['phone'];?>
</td>
                                              <td width="10%" valign="middle">
                                                  <?php if ($_smarty_tpl->tpl_vars['allgroup']->value[$_smarty_tpl->tpl_vars['val']->value['group_id']]) {?><?php echo $_smarty_tpl->tpl_vars['allgroup']->value[$_smarty_tpl->tpl_vars['val']->value['group_id']];?>
<?php } else { ?>未设置<?php }?>
                                              </td>
                                              <td width="25%" valign="middle">
                                                  <?php if ($_smarty_tpl->tpl_vars['val']->value['projects']) {?><?php echo $_smarty_tpl->tpl_vars['val']->value['projects'];?>
<?php } else { ?><a href="/webadmin/project/list">未设置</a><?php }?>
                                              </td>
                                              <td width="10%" valign="middle"><?php echo $_smarty_tpl->tpl_vars['val']->value['login_ip'];?>
</td>
                                              <td width="15%" valign="middle"><?php echo $_smarty_tpl->tpl_vars['val']->value['login_time'];?>
</td>
                                              <td width="10%" align="center" valign="middle">
                                                  <a href="/webadmin/user/edit?user_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['user_id'];?>
">修改权限</a> | 
                                                  <a href="javascript:" onclick="del('<?php echo $_smarty_tpl->tpl_vars['val']->value['user_id'];?>
')">删除</a>
                                              </td>
                                        </tr>
                                        <?php } ?>
                                      </tbody>
                                </table>
                                <div style="float:right;"><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
</div>
                        </div>
                      </div>
                </td>
            </tr>
        </table>
    </td>
 </tr>
</table>
<script type="text/javascript">
function del(user_id){
    if(confirm('确定要删除此用户？')){
        $.getJSON('/webadmin/user/del',{user_id:user_id},function(res){
            alert(res.note);
            if(res.status==1){
               $('#user_'+user_id).remove();
            }
        });
    }
}
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
